from django.urls import path,re_path
from myadmin.views import index,vip,manage_index,manage_lesson,manage_article,goods_video,goods_autio,goods_words
from myadmin.views import article_teacher,article_student,recommend_lesson,recommend_article

urlpatterns = [

    path(r'', index.index, name="myadmin_index"),

    
    # 后台管理员路由
    path(r'login/', index.login, name="myadmin_login"),
    path(r'dologin/', index.dologin, name="myadmin_dologin"),
    path(r'logout/', index.logout, name="myadmin_logout"),


    # 会员信息管理路由
    re_path(r'vip/(?P<pIndex>[0-9]+)$', vip.index, name="myadmin_vip_index"),
    path(r'vip/add/', vip.add, name="myadmin_vip_add"),
    path(r'vip/insert/', vip.insert, name="myadmin_vip_insert"),
    re_path(r'vip/del/(?P<uid>[0-9]+)$', vip.delete, name="myadmin_vip_del"),
    re_path(r'vip/edit/(?P<uid>[0-9]+)$', vip.edit, name="myadmin_vip_edit"),
    re_path(r'vip/update/(?P<uid>[0-9]+)$', vip.update, name="myadmin_vip_update"),

    # 轮播图管理

    #首页轮播图
    re_path(r'^manage_index/webset$', manage_index.webset, name="myadmin_web_index"),# 轮播图管理
    re_path(r'^manage_index/dowebset/(?P<pid>[0-9]+)$', manage_index.dowebset, name="myadmin_doweb_index"),# 更新轮播图

    #课程轮播图
    re_path(r'^manage_lesson/webset$', manage_lesson.webset, name="myadmin_web_lesson"),# 轮播图管理
    re_path(r'^manage_lesson/dowebset/(?P<pid>[0-9]+)$', manage_lesson.dowebset, name="myadmin_doweb_lesson"),# 更新轮播图

    #案例轮播图
    re_path(r'^manage_article/webset$', manage_article.webset, name="myadmin_web_article"),# 轮播图管理
    re_path(r'^manage_article/dowebset/(?P<pid>[0-9]+)$', manage_article.dowebset, name="myadmin_doweb_article"),# 更新轮播图

    #商品管理
        #视频课程管理
    re_path(r'goods_video/(?P<pIndex>[0-9]+)$', goods_video.video_index, name="myadmin_goods_video_index"),
    path(r'goods_video/add/', goods_video.video_add, name="myadmin_goods_video_add"),
    path(r'goods_video/insert/', goods_video.video_insert, name="myadmin_goods_video_insert"),
    re_path(r'goods_video/del/(?P<uid>[0-9]+)$', goods_video.delete, name="myadmin_goods_del"),
    re_path(r'goods_video/edit/(?P<uid>[0-9]+)$', goods_video.video_edit, name="myadmin_goods_video_edit"),
    re_path(r'goods_video/update/(?P<uid>[0-9]+)$', goods_video.video_update, name="myadmin_goods_video_update"),
        #音频课程管理
    re_path(r'goods_autio/(?P<pIndex>[0-9]+)$', goods_autio.autio_index, name="myadmin_goods_autio_index"),
    path(r'goods_autio/add/', goods_autio.autio_add, name="myadmin_goods_autio_add"),
    path(r'goods_autio/insert/', goods_autio.autio_insert, name="myadmin_goods_autio_insert"),
    re_path(r'goods_autio/del/(?P<uid>[0-9]+)$', goods_autio.delete, name="myadmin_goods_del"),
    re_path(r'goods_autio/edit/(?P<uid>[0-9]+)$', goods_autio.autio_edit, name="myadmin_goods_autio_edit"),
    re_path(r'goods_autio/update/(?P<uid>[0-9]+)$', goods_autio.autio_update, name="myadmin_goods_autio_update"),
        #文字课程管理
    re_path(r'goods_words/(?P<pIndex>[0-9]+)$', goods_words.words_index, name="myadmin_goods_words_index"),
    path(r'goods_words/add/', goods_words.words_add, name="myadmin_goods_words_add"),
    path(r'goods_words/insert/', goods_words.words_insert, name="myadmin_goods_words_insert"),
    re_path(r'goods_words/del/(?P<uid>[0-9]+)$', goods_words.delete, name="myadmin_goods_del"),
    re_path(r'goods_words/edit/(?P<uid>[0-9]+)$', goods_words.words_edit, name="myadmin_goods_words_edit"),
    re_path(r'goods_words/update/(?P<uid>[0-9]+)$', goods_words.words_update, name="myadmin_goods_words_update"),

    #案例管理
        #导师案例
    re_path(r'article_teacher/(?P<pIndex>[0-9]+)$', article_teacher.article_teacher_index, name="myadmin_article_teacher_index"),
    path(r'article_teacher/add/', article_teacher.article_teacher_add, name="myadmin_article_teacher_add"),
    path(r'article_teacher/insert/', article_teacher.article_teacher_insert, name="myadmin_article_teacher_insert"),
    re_path(r'article_teacher/del/(?P<uid>[0-9]+)$', article_teacher.delete, name="myadmin_article_del"),
    re_path(r'article_teacher/edit/(?P<uid>[0-9]+)$', article_teacher.article_teacher_edit, name="myadmin_article_teacher_edit"),
    re_path(r'article_teacher/update/(?P<uid>[0-9]+)$', article_teacher.article_teacher_update, name="myadmin_article_teacher_update"),
        #学员案例
    re_path(r'article_student/(?P<pIndex>[0-9]+)$', article_student.article_student_index, name="myadmin_article_student_index"),
    path(r'article_student/add/', article_student.article_student_add, name="myadmin_article_student_add"),
    path(r'article_student/insert/', article_student.article_student_insert, name="myadmin_article_student_insert"),
    re_path(r'article_student/del/(?P<uid>[0-9]+)$', article_student.delete, name="myadmin_article_del"),
    re_path(r'article_student/edit/(?P<uid>[0-9]+)$', article_student.article_student_edit, name="myadmin_article_student_edit"),
    re_path(r'article_student/update/(?P<uid>[0-9]+)$', article_student.article_student_update, name="myadmin_article_student_update"),
 
    #推荐管理
        #课程推荐
    re_path(r'recommend_lesson/(?P<pIndex>[0-9]+)$',recommend_lesson.lesson_index,name="myadmin_recommend_lesson_index"),
    re_path(r'recommend_lesson/add/',recommend_lesson.lesson_add,name="myadmin_recommend_lesson_add"),
    re_path(r'recommend_lesson/insert/',recommend_lesson.lesson_insert,name="myadmin_recommend_lesson_insert"),
    re_path(r'recommend_lesson/del/(?P<uid>[0-9]+)$',recommend_lesson.lesson_del,name="myadmin_recommend_lesson_del"),
        #案例推荐
    re_path(r'recommend_article/(?P<pIndex>[0-9]+)$',recommend_article.article_index,name="myadmin_recommend_article_index"),
    re_path(r'recommend_article/add/',recommend_article.article_add,name="myadmin_recommend_article_add"),
    re_path(r'recommend_article/insert/',recommend_article.article_insert,name="myadmin_recommend_article_insert"),
    re_path(r'recommend_article/del/(?P<uid>[0-9]+)$',recommend_article.article_del,name="myadmin_recommend_article_del"),
]